/**
 * Created by liguangsong on 16/8/12.
 */
import React from 'react'
import NavigationBar from '../component/navigationBar/index.js'
import TitleImageView from '../component/titleImageView/index.js'
import ContentView from '../component/contentView/index.js'
import FootBar from '../component/footBar/index.js'

var App = React.createClass({
    getChildrenView() {
        if (this.props.children == null) {
            return <ContentView />;
        }
        else {
            return this.props.children
        }
    },

    render() {
        console.log('app start');
        return (
            <div>
                <NavigationBar />
                <TitleImageView />
                {this.getChildrenView()}
                <FootBar />
            </div>
        )
    }
});

export default App;